home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 December / MACPOWER-1997-12.ISO.7z / MACPOWER-1997-12.ISO / AMUG / PROGRAMMING / Raven 1.2.sit / Raven 1.2 / Source / Foundation / Common / ZLocker.h < prev    next >
Text File  |  1996-10-28  |  973b  |  45 lines

  1. /*
  2.  *  File:       ZLocker.h
  3.  *  Summary:    Stack based class that locks things.
  4.  *  Written by: Jesse Jones
  5.  *
  6.  *  Copyright ゥ 1996 Jesse Jones. 
  7.  *    For conditions of distribution and use, see copyright notice in ZTypes.h  
  8.  *
  9.  *  Change History (most recent first):
  10.  *
  11.  *         <->     1/14/96    JDJ        Created
  12.  */
  13.  
  14. #pragma once
  15.  
  16. #include <ZConstants.h>
  17. #include <ZDebug.h>
  18.  
  19.  
  20. //-----------------------------------
  21. //    Forward References
  22. //
  23. class MBaseLockable;
  24.  
  25.  
  26. // ===================================================================================
  27. //    class TLocker
  28. // ===================================================================================
  29. class TLocker {
  30.  
  31. public:
  32.                 ~TLocker();
  33.  
  34.                 TLocker(const MBaseLockable& object, bool moveHigh = kDontMoveHigh);
  35.  
  36.                 TLocker(const MBaseLockable* object, bool moveHigh = kDontMoveHigh);
  37.  
  38.                 TLocker(Handle hand, bool moveHigh = kDontMoveHigh);
  39.  
  40. private:
  41.     MBaseLockable*    mObject;
  42.     Handle            mHandle;
  43.     SignedByte        mOldState;
  44. };
  45.